// ==================采购开票============================                               
import request from "@/utils/request";

// 查询
export function listInfo(query) {
    return request({
      url: '/heart/KingInvoicePayable/list',
      method: 'get',
      params: query
    })
  }
  
  // 查询
  export function getInfo(id) {
    return request({
      url: '/heart/KingInvoicePayable/' + id,
      method: 'get'
    })
  }

  // 采购退料单 获取列表
export function getPurchaseRefund(query) {
  return request({
      url: "/heart/KingProcureRefund/list",
      method: "get",
      params: query,
  });
}
  
  // 暂存
  export function addInfoTemporary(data) {
    return request({
      url: '/heart/KingInvoicePayable/draft',
      method: 'post',
      data: data
    })
  }

  // 提交
  export function addInfo(data) {
    return request({
      url: '/heart/KingInvoicePayable/submit',
      method: 'post',
      data: data
    })
  }
  
  // 修改
  export function updateInfo(data) {
    return request({
      url: '/heart/KingInvoicePayable',
      method: 'put',
      data: data
    })
  }
  
  // 删除
  export function delInfo(id) {
    return request({
      url: '/heart/KingInvoicePayable/' + id,
      method: 'delete'
    })
  }
  
  // 导出
  export function exportInfo(query) {
    return request({
      url: '/heart/KingInvoicePayable/export',
      method: 'get',
      params: query
    })
  }